import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import '@/styles/index.less'

import 'vant/lib/index.css'
Vue.use(Vant)
Vue.config.productionTip = false

import moment from 'moment'
Vue.prototype.$moment = moment
Vue.filter('dateYer', function (val) {
  //当input为时间戳时，需转为Number类型
  // 使用momentjs这个日期格式化类库实现日期的格式化功能
  return moment(new Date()).format('YYYY') - +val.split('-')[0] + 1
})
// 引入公共组件
import components from './components'
Vue.use(components)

import '@/styles/github-markdown.css'

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app')
